<template>
	<view>
		<textarea v-model="con" placeholder="请输入报价,多个报价请换行" class="input-box"/>
		<view class="prompt">提示：多个报价请换行</view>
		<view class="footer">
			<view class="up-btn" @click="upHand">上传</view>
		</view>
	</view>
</template>

<script>
	import API from '../../api/index.js'
	export default {
		data() {
			return {
				con:''
			}
		},
		methods: {
			upHand () {
				if (this.con=='') {
					uni.showToast({
						title:'内容不能为空',
						icon:'none'
					})
					return
				} else {
					API.indexHome.upPrice({content:this.con}).then(res => {
						if (res.errno == '0') {
							uni.showToast({
								title: '上传成功',
								duration: 2000
							});
							setTimeout(()=>{
								wx.navigateBack()
							},2000)
						}
					})
				}
			}
		}
	}
</script>

<style>
.input-box {
	width: 702rpx;
	height: 600rpx;
	background: #FFFFFF;
	border-radius: 20rpx;
	margin:20rpx auto;
	padding: 20rpx;
	box-sizing: border-box;
	font-size: 28rpx;
}
.prompt {
	line-height: 70rpx;
	font-size: 28rpx;
	color: #666666;
	margin-left: 24rpx;
}
.footer {
	
	height: 110rpx;
	background: #FFFFFF;
	width: 100%;
	position: fixed;
	bottom:0;
	left:0;
}
.up-btn {
	width: 702rpx;
	height: 80rpx;
	background: #333333;
	border-radius: 40rpx;
	margin: 15rpx auto;
	color: #fff;
	font-size: 30rpx;
	color: #F6CB90;
	line-height: 80rpx;
	text-align: center;
}
.up-btn:active {
	opacity: 0.7;
}
</style>
